<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="__STATIC__/css/shopin.css" rel="stylesheet" />
    <title>源之东方</title>
    <style>
        *{
            list-style: none;
        }
        .kan_list li{
            background: white;
            padding: 5px 0;
            width: 100%;
            position: relative;
        }
        .kan_list .header_img{
            width: 50px;
            height: 50px;
            float: left;
            margin:0 10px;
        }
        .kan_list .header_img img{
            width: 100%;
            height: 100%;
        }
        .kan_list p{
            height: 50px;
            line-height: 50px;
            display: inline-block;
            width: 60vw;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .kan_list button{
            text-align: center;
            background: #fe5982;
            border: none;
            border-radius:6px;
            position: absolute;
            color:aliceblue;
            top: 20px;
            right: 20px;
        }
    </style>
</head>
<body>
<div class="header">
    <div class="left">
        <a class="a-back"><span>返回</span></a>
    </div>
    <div class="center">
        <h1>我的砍价</h1>
    </div>
</div>
<!--//头部结束-->
<ul class="kan_list">
    {if ($list) }
    {volist name='list' id='v'}
    <li href="/cut/{$v.cut_id}/{$uid}">
        <div class="header_img">
            {if (substr($v.url,1,1) != 'h' )}
            <img src="http://img.58bjcf.com/{$v.url}" >
            {else}
            <img src="{$v.url}" >
            {/if}
        </div>
        <p>{$v.name} &nbsp; {$v.color} &nbsp; {$v.size}</p>
        <button class="colse">复制链接</button>
    </li>
    {/volist}
    {else}
    <div class="empty">
        <div class="empty-pic cry-pic"></div>
        <div class="empty-text">您还没有砍价山沟，快去逛逛吧！</div>
        <div class="empty-btn"><a href="/" class="btn">去逛逛</a></div>
    </div>
    {/if}

</ul>
<script src="__STATIC__/js/jquery-3.1.1.min.js"></script>
<script>
    $('.kan_list li').each(function(){
        $(this).click(function(){
            $(this).attr('src',$(this).attr('href'));
            window.location.href=$(this).attr('href');

        })
    })
    $(".colse").on("click",function(){
        var Url2=$(this).parent().attr('href');
        event.stopPropagation();
        var oInput = document.createElement('input');
        oInput.value = 'http://sy.58bjcf.com'+Url2;
        document.body.appendChild(oInput);
        oInput.select(); // 选择对象
        document.execCommand("Copy"); // 执行浏览器复制命令
        oInput.className = 'oInput';
        oInput.style.display='none';
        alert('复制成功');
    });
    $('.left .a').on('click',function(){
        window.history.go(-1);
    })
</script>
</body>
</html>